home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-05 | 647 b | 23 lines | [MATF/MATL] |
- function z = crvfun(Clist,ct,x)
- % z = crvfun(Clist,ct,x)
- % Evaluates the function created with crvfit.m
- % Clist is the coefficient list, input.
- % ct is the curve type, input.
- % x is the input value(s), input.
- % z is the function value(s), output.
- A = Clist(1);
- B = Clist(2);
- C = Clist(3);
- D = Clist(4);
- L = Clist(5);
- if ct==1, z = A./x + B; end
- if ct==2, z = D./(x + C); end
- if ct==3, z = (A.*x + B).^(-1); end
- if ct==4, z = x./(A + B.*x); end
- if ct==5, z = A*log(x) + B; end
- if ct==6, z = C*exp(A.*x); end
- if ct==7, z = C.*x.^A; end
- if ct==8, z = (A.*x + B).^(-2); end
- if ct==9, z = C.*x.*exp(-D.*x); end
- if ct==10,z = L./(1 + C.*exp(A.*x)); end
-